package Clojure::Spp;

use Exporter;
our @ISA = qw();
our @EXPORT_OK = qw(spp);

use 5.016;

sub file_to_slurp {
    my $file = shift;
    my @chars = ();
    (open my $fh, '<', $file) or die $!;
    while (my $line = <$fh>) {
        foreach my $char (split //, $line) {
            push @chars, $char;
        }
    }
    return [ @chars ];
}

# first to transfer escape char
sub escape_char {
    my ($text, $escape_char) = @_;
    # $escape_char = ("\'", "\\");
    # with-text
}

sub split_chars_with_border {
    my ($text, $split_border) = @_;
    # $split_border = ([ "'", "'", "string"]); 
    # [#"\[(=+)\[", #"\]$1\]", "string"]
}

# 将 dynamic keyword filter out with
# 遇到复杂问题，就拆分成几个简单的问题，就能解决了
# 这个代码只涉及部分函数，只是为了将代码本身的转换
# 转换器只是实现了语法上的转换，而解释器则实现了函数的转换
